package com.dy.springcloud;

import com.dy.springcloud.config.MyRibbonConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

//标识为eureke client ,可以被注册
@EnableEurekaClient
//获取在eureka server注册的服务信息
@EnableDiscoveryClient
//使用@RibbonClient为一个服务提供集群设置ribbon的负载均衡算法
@RibbonClient(name = "MEMBER_SERVICE_PROVIDER_URL",configuration = MyRibbonConfig.class)
@SpringBootApplication
public class MemberConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(MemberConsumerApplication.class, args);
    }
}
